import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
import { Language } from "../../../../extend/language/Language";
import { GButton } from "../../../../com/mui/controls/GButton";
//class PetSoulLevelTipPanel
    
    export  class PetSoulLevelTipPanel /* flash.display.Sprite */
    {
        constructor(arg1: Boolean=false)
        {
            
            this._isGrowth = arg1;
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc1=0;
            if (this._isGrowth) 
            {
                loc1 = 54618;
            }
            else 
            {
                loc1 = 54611;
            }
            ObjCreate.createBg(0, 0, 210, 50, this, ImagesConst.ToolTipBg);
            this._tipTxt = ObjCreate.createTextField("", 0, 10, 210, 50, this, new GTextFormat(FontUtil.songtiName, 12, 65280));
            this._tipTxt.autoSize = flash.text.TextFieldAutoSize.CENTER;
            this._tipTxt.htmlText = Language.getString(loc1);
            this._closeBtn = ObjCreate.createGButton("", 190, 2, 19, 19, this, "CloseButton");
            this._closeBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onCloseBtnClickHandler);
            return;
        }

        /* internal  */onCloseBtnClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            if (this.parent) 
            {
                this.parent.removeChild(this);
            }
            return;
        }

        /* internal */ /* var */_closeBtn: GButton;

        /* internal */ /* var */_tipTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_isGrowth: Boolean;
    }
